﻿@model PagedList.IPagedList<EventPlanner.Models.Evento>

@{
    ViewBag.Title = "Eventos";
}
 <div class="subtitle">
<h2>@EventPlanner.Resources.Global.Global.lbl_Eventos</h2>
</div>
@Html.Partial("_Busqueda_Eventos")  
	           
<table>
    <tr>
        <th>
          @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Nombre, "TodosLosEventos", new { sortOrder = ViewBag.NameSortParm }) @Html.Raw((string)ViewBag.NameAddOn)
        </th>
        <th>
             @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Fecha, "TodosLosEventos", new { sortOrder = ViewBag.DateSortParm }) @Html.Raw((string)ViewBag.DateAddOn)
        </th>
        <th>
            @EventPlanner.Resources.Global.Global.lbl_Hora
        </th>

        <th>
            @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Lugar, "TodosLosEventos", new { sortOrder = ViewBag.LugarSortParm }) @Html.Raw((string)ViewBag.LugarAddOn)
        </th>
        
        <th>
            @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Organizador, "TodosLosEventos", new { sortOrder = ViewBag.OrgSortParm }) @Html.Raw((string)ViewBag.OrgAddOn)
        </th>
        <th>
            @EventPlanner.Resources.Global.Global.lbl_Participantes/@EventPlanner.Resources.Global.Global.lbl_Cupo
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fecha)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Hora)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Lugar)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.Organizador.Nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Participantes.Count)/@Html.DisplayFor(modelItem => item.Cupo)
        </td>
        <td>
            @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Detalles, "DetailsTodos", new { id = item.id }) 
        </td>
    </tr>
}
</table>
<p></p>

@Html.Partial("_Navegacion_Eventos",Model)
